package com.fled.itsmbigscreen.enums;

/**
 *
 */
public enum RoleEnums {
    admin                  (1,"管理员"),
    user                      (2,"用户"),
    purchase                     (3,"采购员"),
    supply                     (4,"供应商"),
    ;
    private Integer ecode;

    private String emsg;

    RoleEnums(Integer ecode, String emsg) {
        this.ecode = ecode;
        this.emsg = emsg;
    }

    public Integer getEcode() {
        return ecode;
    }

    public String getEmsg() {
        return emsg;
    }

    public static RoleEnums statOf(Integer ecode) {
        for (RoleEnums state : values())
            if (state.getEcode().equals(ecode))
                return state;
        return null;
    }
}
